<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
	<title></title>
</head>
<body>

<script type="text/javascript">
(function () {
    if (typeof name === 'undefined') {
    	var name ='Jack';
        console.log('Goodbye ' + this.name);
    } else {
        console.log('Hello ' + name);
    }
})();
var name = 'World!';
</script>
</body>
</html>